package routers

import (
	"shop/internal/handler"

	"github.com/gin-gonic/gin"
)

func init() {
	apiV1RouterFns = append(apiV1RouterFns, func(group *gin.RouterGroup) {
		tkAdRouter(group, handler.NewTkAdHandler())
	})
}

func tkAdRouter(group *gin.RouterGroup, h handler.TkAdHandler) {
	group.POST("/tkAd", h.Create)
	group.DELETE("/tkAd/:id", h.DeleteByID)
	group.POST("/tkAd/delete/ids", h.DeleteByIDs)
	group.PUT("/tkAd/:id", h.UpdateByID)
	group.GET("/tkAd/:id", h.GetByID)
	group.POST("/tkAd/list/ids", h.ListByIDs)
	group.POST("/tkAd/list", h.List)
	group.POST("/ad/async", h.Async)
}
